package com.ruoyi.help.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.help.mapper.HelpWalkthroughMapper;
import com.ruoyi.help.domain.HelpWalkthrough;
import com.ruoyi.help.service.IHelpWalkthroughService;

/**
 * 培训记录Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-06-13
 */
@Service
public class HelpWalkthroughServiceImpl implements IHelpWalkthroughService 
{
    @Autowired
    private HelpWalkthroughMapper helpWalkthroughMapper;

    /**
     * 查询培训记录
     * 
     * @param uId 培训记录主键
     * @return 培训记录
     */
    @Override
    public HelpWalkthrough selectHelpWalkthroughByUId(Long uId)
    {
        return helpWalkthroughMapper.selectHelpWalkthroughByUId(uId);
    }

    /**
     * 查询培训记录列表
     * 
     * @param helpWalkthrough 培训记录
     * @return 培训记录
     */
    @Override
    public List<HelpWalkthrough> selectHelpWalkthroughList(HelpWalkthrough helpWalkthrough)
    {
        return helpWalkthroughMapper.selectHelpWalkthroughList(helpWalkthrough);
    }

    /**
     * 新增培训记录
     * 
     * @param helpWalkthrough 培训记录
     * @return 结果
     */
    @Override
    public int insertHelpWalkthrough(HelpWalkthrough helpWalkthrough)
    {
        helpWalkthrough.setCreateTime(DateUtils.getNowDate());
        return helpWalkthroughMapper.insertHelpWalkthrough(helpWalkthrough);
    }

    /**
     * 修改培训记录
     * 
     * @param helpWalkthrough 培训记录
     * @return 结果
     */
    @Override
    public int updateHelpWalkthrough(HelpWalkthrough helpWalkthrough)
    {
        helpWalkthrough.setUpdateTime(DateUtils.getNowDate());
        return helpWalkthroughMapper.updateHelpWalkthrough(helpWalkthrough);
    }

    /**
     * 批量删除培训记录
     * 
     * @param uIds 需要删除的培训记录主键
     * @return 结果
     */
    @Override
    public int deleteHelpWalkthroughByUIds(Long[] uIds)
    {
        return helpWalkthroughMapper.deleteHelpWalkthroughByUIds(uIds);
    }

    /**
     * 删除培训记录信息
     * 
     * @param uId 培训记录主键
     * @return 结果
     */
    @Override
    public int deleteHelpWalkthroughByUId(Long uId)
    {
        return helpWalkthroughMapper.deleteHelpWalkthroughByUId(uId);
    }
}
